/*
package com.itheima.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

*/
/*
*  应用域中的属性变化
* *//*

@WebListener("/ServletListenerDemo")
public class ServletListenerDemo  implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("监听器对象的创建");
        ServletContext servletContext = sce.getServletContext();
        servletContext.setAttribute("username","zhangsan");
        servletContext.setAttribute("username","lisi");
        servletContext.removeAttribute("username");
    }



      @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("监听对象的销毁");
    }
}
*/
